var http = require('http'),
    url = require('url');
var Router = require('./js/router.js');

http.createServer(function(req,res) {
  var pathname = url.parse(req.url).pathname;
  console.log('pathname:'+pathname);
  req.setEncoding('utf-8');
  res.writeHead(200,{'Content-Type':'text/html'});
  Router.router(res,req,pathname);
}).listen(3000,'127.0.0.1');
console.log('server start,server\'s port:3000');